local gearman=require("gearman")
local callsToDate = 0

local function multiplerv()
	return 1, "a string", {elem="and \"a\" \n table"}
end

x = gearman.worker()
gearman.addworkfunc(x, "date", function() callsToDate = callsToDate + 1 return os.date() end)
gearman.addworkfunc(x, "datecalls", function() return tostring(callsToDate) end)
gearman.addworkfunc(x, "mrv_test", function(args) return gearman.encodervs(multiplerv, args) end)

x()
